set nocount on exec ('select getdate() as [' + @@servername + ']') select cast(instance_name as varchar(30)), cast(counter_name as varchar(30)), cntr_value from master.dbo.sysperfinfo where object_name = 'SQLServer:Databases' and counter_name in ( 'Data File(s) Size (KB)', 'Log File(s) Size (KB)', 'Log File(s) Used Size (KB)')